﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApAPPViewerDisabler
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension;
using System;


namespace DnProcessSimulateCommands;

public class CApAPPViewerDisabler : IDisposable
{
  private readonly TxPerformanceModeEx m_disableRobotViewerUpdateMode;
  private readonly TxPerformanceModeEx m_signalCreationMode;

  public CApAPPViewerDisabler()
  {
    this.m_signalCreationMode = new TxPerformanceModeEx((TxPerformanceModeType) 0);
    TxApplicationEx.PerformanceModeManager().BeginMode(this.m_signalCreationMode);
    this.m_disableRobotViewerUpdateMode = new TxPerformanceModeEx((TxPerformanceModeType) 4);
    TxApplicationEx.PerformanceModeManager().BeginMode(this.m_disableRobotViewerUpdateMode);
  }

  public void Dispose()
  {
    TxApplicationEx.PerformanceModeManager().EndMode(this.m_disableRobotViewerUpdateMode);
    TxApplicationEx.PerformanceModeManager().EndMode(this.m_signalCreationMode);
  }
}
